// --------------------------------------------------------------------------------------------------------------------
// <copyright file="IUniverseExpoCell.cs" company="Open Trader">
//   Copyright (c) David Denis (david.denis@systemathics.com)
// </copyright>
// <summary>
//   |  Open Trader - The Open Source Systematic Trading Platform
//   |
//   |  This program is free software: you can redistribute it and/or modify
//   |  it under the terms of the GNU General Public License as published by
//   |  the Free Software Foundation, either version 2 of the License, or
//   |  (at your option) any later version.
//   |
//   |  This program is distributed in the hope that it will be useful,
//   |  but WITHOUT ANY WARRANTY; without even the implied warranty of
//   |  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//   |  GNU General Public License for more details.
//   |
//   |  You should have received a copy of the GNU General Public License
//   |  along with this program.  If not, see http://www.gnu.org/licenses
//   |
//   |  Up to date informations about Open Trader can be found at :
//   |    http://opentrader.org
//   |    http://opentrader.codeplex.com
//   |
//   |  For professional services, please visit us at :
//   |    http://www.systemathics.com
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Org.OpenTrader.Framework.Forge.Interfaces
{
    #region Using Directives

    using System;

    using Org.OpenTrader.Framework.Forge.Enums;

    #endregion

    /// <summary>
    /// Exposition cell for a universe
    /// </summary>
    public interface IUniverseExpoCell : IExpoCell
    {
        #region Properties

        /// <summary>
        /// Type of the expo
        /// </summary>
        EExpoCellType ExpoCellType { get; }

        /// <summary>
        /// Gets Fees.
        /// </summary>
        double Fees { get; }

        /// <summary>
        /// Check if the vales are changed
        /// </summary>
        bool IsChanged { get; }

        /// <summary>
        /// TRUE if NominalLong > NominalShort
        /// </summary>
        bool IsLong { get; }

        /// <summary>
        /// TRUE if NominalShort > NominalLong  
        /// </summary>
        bool IsShort { get; }

        /// <summary>
        /// Check if updated
        /// </summary>
        bool IsUpdated { get; }

        /// <summary>
        /// Check if is updating values
        /// </summary>
        bool IsUpdating { get; }

        /// <summary>
        /// LastUpdate Time
        /// </summary>
        DateTime LastUpdate { get; }

        /// <summary>
        /// Gets NetPL.
        /// </summary>
        double NetPL { get; }

        /// <summary>
        /// Return the market expo : Long - Short
        /// </summary>
        double NominalExpo { get; }

        /// <summary>
        /// Gets NominalLong.
        /// </summary>
        double NominalLong { get; }

        /// <summary>
        /// Gets NominalShort.
        /// </summary>
        double NominalShort { get; }

        /// <summary>
        /// Gets PL.
        /// </summary>
        double PL { get; }

        /// <summary>
        /// Gets Realized.
        /// </summary>
        double Realized { get; }

        /// <summary>
        /// Gets UnRealized.
        /// </summary>
        double UnRealized { get; }

        #endregion

        #region Indexers

        /// <summary>
        /// Get InstrumentListExpoCell using index
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        InstrumentListExpoCell this[int index]
        {
            get;
        }

        #endregion

        #region Public Methods

        /// <summary>
        /// Add cell
        /// </summary>
        /// <param name="cell">
        /// </param>
        /// <returns>
        /// The add.
        /// </returns>
        bool Add(InstrumentListExpoCell cell);

        /// <summary>
        /// Remove cell
        /// </summary>
        /// <param name="cell">
        /// </param>
        /// <returns>
        /// The remove.
        /// </returns>
        bool Remove(InstrumentListExpoCell cell);

        #endregion
    }
}